Average case analysis of the Boyer-Moore algorithm

نویسنده

  • Tsung-Hsi Tsai
چکیده

Some limit theorems (including a Berry-Esseen bound) are derived for the number of comparisons taken by the Boyer-Moore algorithm for finding the occurrences of a given pattern in a random Markovian text. Previously, only special variants of this algorithm have been analyzed. We also propose means of computing the limiting constants for the mean and the variance.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Approximate Boyer-Moore String Matching

The Boyer-Moore idea applied in exact string matching is generalized to approximate string matching. Two versions of the problem are considered. The k mismatches problem is to find all approximate occurrences of a pattern string (length m) in a text string (length n) with at most k mismatches. Our generalized Boyer-Moore algorithm is shown (under a mild independence assumption) to solve the pro...

متن کامل

The i-largest Number Domination Sequence and Its Application to the Average Case Analysis of the Horspool Algorithm

In this paper, we define the i-largest number domination sequence and compute the number of i-largest number domination sequence with length L. We use this result to analyze the average case analysis of the Horspool algorithm when we are given a random pattern and a random text.

متن کامل

On the Worst-Case Behavior of String-Searching Algorithms

Any algorithm for finding a pattern of length k in a string of length n must examine at least n k + of the characters of the string in the worst case. By considering the pattern 00 0, we prove that this is the best possible result. Therefore there do not exist pattern matching algorithms whose worst-case behavior is "sublinear" in n (that is, linear with constant less than one), in contrast wit...

متن کامل

A Simple Fast Hybrid Pattern-Matching Algorithm

The Knuth–Morris–Pratt (KMP) pattern-matching algorithm guarantees both independence from alphabet size and worst-case execution time linear in the pattern length; on the other hand, the Boyer–Moore (BM) algorithm provides near-optimal average-case and best-case behaviour, as well as executing very fast in practice. We describe a simple algorithm that employs the main ideas of KMP and BM (with ...

متن کامل

Practical Fast Searching in Strings

The problem is that of searching a large block of text to find the first occurrence of a substring (which we will call the ‘pattern’). This particular operation is provided in most text editing systems and it also has applications in bibliographic retrieval systems. Since the text to be searched can be overwhelmingly large — perhaps hundreds of thousands of characters — it is important to use e...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Random Struct. Algorithms

دوره 28  شماره 

صفحات  -

تاریخ انتشار 2006